using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SqlSugar;

namespace AppDown.Db.Models.Base
{
    /// <summary>
    /// 数据库实体基类
    /// </summary>
    public class BaseEntity
    {
        /// <summary>
        /// 行号 [主键，自动递增]
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 状态 [0：正常，1：禁用]
        /// </summary>
        public int Status { get; set; } = 0;
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 标识版本字段,用于乐观锁
        /// </summary>
        [SugarColumn(IsEnableUpdateVersionValidation = true)]
        public long RowVer { get; set; }
    }
}